From: Glenn Morris Date: Thu, 24 Feb 2011 03:59:04 +0000 (-0800) Subject: Dired-X fix for bug#5216. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~4635 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=212ad55cdb92a072e9db9a912bfe8aea43c3e85a;p=emacs.git Dired-X fix for bug#5216. * lisp/dired-x.el (dired-hack-local-variables): Handle interrupts during hacking local variables. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 25f21d08dc6..b6125412f05 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-02-24 Glenn Morris + * dired-x.el (dired-hack-local-variables): + Handle interrupts during hacking local variables. (Bug#5216) + * emacs-lisp/autoload.el (autoload-save-buffers) (autoload-find-destination, update-directory-autoloads): Avoid prompts when updating autoloads. diff --git a/lisp/dired-x.el b/lisp/dired-x.el index dcf8906976b..ce07676fc99 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -774,12 +774,13 @@ See also `dired-enable-local-variables'." (insert "\^L\n") (insert-file-contents dired-local-variables-file)) ;; Hack 'em. - (let ((buffer-file-name dired-local-variables-file)) - (hack-local-variables)) + (unwind-protect + (let ((buffer-file-name dired-local-variables-file)) + (hack-local-variables)) + ;; Delete this stuff: `eobp' is used to find last subdir by dired.el. + (delete-region opoint (point-max))) ;; Make sure that the modeline shows the proper information. - (dired-sort-set-modeline) - ;; Delete this stuff: `eobp' is used to find last subdir by dired.el. - (delete-region opoint (point-max))))) + (dired-sort-set-modeline)))) (make-obsolete 'dired-hack-local-variables 'hack-dir-local-variables-non-file-buffer "24.1")